package com.test.imcmqtt.mqtt1;

import lombok.Data;
import org.springframework.stereotype.Component;

/**
 * mqtt 的连接信息
 */
@Data
public class AutoMqttProperties {

	// broker连接地址
	// @Value("${com.mqtt.host}")
	// private String host;
	private String host = "tcp://1p8988h861.iask.in:37546";

	// 用户名
	// @Value("${com.mqtt.username}")
	// private String username;
	private String username = "admin";

	// 密码
	// @Value("${com.mqtt.password}")
	// private String password;
	private String password = "password";

	// 身份id
	// @Value("${com.mqtt.clientid}")
	// private String clientid;
	private String clientid = "clientid";

	// 超时（单位是秒）
	// @Value("${com.mqtt.timeout}")
	// private int timeout;
	private int timeout = 10;

	// 会话心跳时间 （单位为秒）
	// @Value("${com.mqtt.keepalive}")
	// private int keepalive;
	private int keepalive = 20;

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getClientid() {
		return clientid;
	}

	public void setClientid(String clientid) {
		this.clientid = clientid;
	}

	public int getTimeout() {
		return timeout;
	}

	public void setTimeout(int timeout) {
		this.timeout = timeout;
	}

	public int getKeepalive() {
		return keepalive;
	}

	public void setKeepalive(int keepalive) {
		this.keepalive = keepalive;
	}

}
